package com.wry.sharding.dao;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <h1>订单表实体</h1>
 *
 * @author <a href="mailto::aijiangyoubuaicu@dingtalk.com">梁业锦</a>
 * @version 1.0.0
 * @since 2021-09-10
 */
@Data
@TableName(value = "oms_order")
public class OmsOrder implements Serializable{

	private static final long serialVersionUID = 6794853353056021774L;

	/**
	 * 主键
	 */
	@TableId(value = "id", type = IdType.ASSIGN_ID)
	private Long id;

	/**
	 * 订单编号
	 */
	@TableField(value = "order_number")
	private String orderNumber;

	/**
	 * 新的订单编号
	 */
	@TableField(exist = false)
	private String newOrderNumber;

	/**
	 * 原始单号
	 */
	@TableField(value = "original_order_number")
	private String originalOrderNumber;

	/**
	 * 平台id
	 */
	@TableField(value = "shop_id")
	private Integer shopId;

	/**
	 * 平台名称
	 */
	@TableField(value = "platform_name")
	private String platformName;

	/**
	 * 店铺名称
	 */
	@TableField(value = "shop_name")
	private String shopName;

	/**
	 * 订单状态
	 */
	@TableField(value = "order_status")
	private Integer orderStatus;

	/**
	 * 订单类型
	 */
	@TableField(value = "order_type")
	private Integer orderType;

	/**
	 * 原始单来源类型
	 */
	@TableField(value = "order_source_type")
	private Integer orderSourceType;

	/**
	 * 原始单下单时间
	 */
	@TableField(value = "order_create_date")
	private LocalDateTime orderCreateDate;

	/**
	 * 付款状态
	 */
	@TableField(value = "pay_status")
	private Integer payStatus;

	/**
	 * 支付单号
	 */
	@TableField(value = "pay_number")
	private String payNumber;

	/**
	 * 支付时间
	 */
	@TableField(value = "pay_time")
	private LocalDateTime payTime;

	/**
	 * 支付方式
	 */
	@TableField(value = "pay_type")
	private Integer payType;

	/**
	 * 支付账户
	 */
	@TableField(value = "pay_account")
	private String payAccount;

	/**
	 * 收款账户
	 */
	@TableField(value = "receive_pay_account")
	private String receivePayAccount;

	/**
	 * 支付金额
	 */
	@TableField(value = "pay_money")
	private BigDecimal payMoney;

	/**
	 * 支付优惠金额
	 */
	@TableField(value = "pay_discount_money")
	private BigDecimal payDiscountMoney;

	/**
	 * 支付退款金额
	 */
	@TableField(value = "pay_refund_money")
	private BigDecimal payRefundMoney;

	/**
	 * 支付客服邮资
	 */
	@TableField(value = "pay_postage_money")
	private BigDecimal payPostageMoney;

	/**
	 * 卖家手工调整金额
	 */
	@TableField(value = "adjust_free")
	private BigDecimal adjustFree;

	/**
	 * 支付结算方式
	 */
	@TableField(value = "pay_settle_type")
	private Integer paySettleType;

	/**
	 * 货品数量
	 */
	@TableField(value = "goods_quantity")
	private Integer goodsQuantity;

	/**
	 * 订单金额
	 */
	@TableField(value = "order_money")
	private BigDecimal orderMoney;

	/**
	 * 收货人名称
	 */
	@TableField(value = "receiver_name")
	private String receiverName;

	/**
	 * 收货人邮编
	 */
	@TableField(value = "receiver_postcode")
	private String receiverPostcode;

	/**
	 * 收货人电话
	 */
	@TableField(value = "receiver_phone")
	private String receiverPhone;

	/**
	 * 收货人省份id
	 */
	@TableField(value = "province_id")
	private Integer provinceId;

	/**
	 * 收货人省份
	 */
	@TableField(value = "receiver_province")
	private String receiverProvince;

	/**
	 * 收货人市区id
	 */
	@TableField(value = "city_id")
	private Integer cityId;

	/**
	 * 收货人市区
	 */
	@TableField(value = "receiver_city")
	private String receiverCity;

	/**
	 * 收货人区域id
	 */
	@TableField(value = "districts_id")
	private Long districtsId;

	/**
	 * 收货人区域
	 */
	@TableField(value = "receiver_districts")
	private String receiverDistricts;

	/**
	 * 收货人地址
	 */
	@TableField(value = "receiver_address")
	private String receiverAddress;

	/**
	 * 收货街道/乡镇
	 */
	@TableField(value = "town_id")
	private Long townId;

	/**
	 * 收货街道/乡镇
	 */
	@TableField(value = "receiver_town")
	private String receiverTown;

	/**
	 * 物流ID
	 */
	@TableField(value = "express_id",updateStrategy = FieldStrategy.IGNORED)
	private Integer expressId;

	/**
	 * 物流名称
	 */
	@TableField(value = "express_name",updateStrategy = FieldStrategy.IGNORED)
	private String expressName;

	/**
	 * 物流代码
	 */
	@TableField(value = "express_code",updateStrategy = FieldStrategy.IGNORED)
	private String expressCode;

	/**
	 * 物流单号
	 */
	@TableField(value = "express_number")
	private String expressNumber;

	/**
	 * 物流执行方式(默认0:物流策略,1:物流方式)
	 */
	@TableField(value = "express_execute_flag")
	private Integer expressExecuteFlag;

	/**
	 * 会员名称
	 */
	@TableField(value = "member_name")
	private String memberName;

	/**
	 * 客户备注
	 */
	@TableField(value = "member_remark")
	private String memberRemark;

	/**
	 * 客户留言
	 */
	@TableField(value = "member_message")
	private String memberMessage;

	/**
	 * 客服备注
	 */
	@TableField(value = "responder_remark")
	private String responderRemark;

	/**
	 * 发货状态
	 */
	@TableField(value = "delivery_status")
	private Integer deliveryStatus;

	/**
	 * 发货时间
	 */
	@TableField(value = "delivery_date")
	private LocalDateTime deliveryDate;

	/**
	 * 仓库ID
	 */
	@TableField(value = "warehouse_id")
	private Integer warehouseId;

	/**
	 * 仓库名称
	 */
	@TableField(value = "warehouse_name")
	private String warehouseName;

	/**
	 * 提交仓储递交状态
	 */
	@TableField(value = "warehouse_submit_status")
	private Integer warehouseSubmitStatus;

	/**
	 * 出库时间
	 */
	@TableField(value = "warehouse_out_date")
	private LocalDateTime warehouseOutDate;

	/**
	 * 标记ID
	 */
	@TableField(value = "tag_id")
	private Integer tagId;

	/**
	 * 标记名称
	 */
	@TableField(value = "tag_name")
	private String tagName;


	/**
	 * 预订单类型
	 */
	@TableField(value = "book_type")
	private Integer bookType;

	/**
	 * 审核人ID
	 */
	@TableField(value = "audit_id")
	private Integer auditId;

	/**
	 * 审核人名称
	 */
	@TableField(value = "audit_or")
	private String auditOr;

	/**
	 * 审核时间
	 */
	@TableField(value = "audit_at")
	private LocalDateTime auditAt;

	/**
	 * 递交时间
	 */
	@TableField(value = "submit_date")
	private LocalDateTime submitDate;

	/**
	 * 下载时间
	 */
	@TableField(value = "download_date")
	private LocalDateTime downloadDate;

	/**
	 * 成交时间
	 */
	@TableField(value = "deal_date")
	private LocalDateTime dealDate;

	/**
	 * 激活时间
	 */
	@TableField(value = "activate_date")
	private LocalDateTime activateDate;

	/**
	 * 是否已冻结
	 */
	@TableField(value = "freezed_at")
	private LocalDateTime freezedAt;

	/**
	 * 是否已冻结
	 */
	@TableField(value = "freeze_reason")
	private String freezeReason;

	/**
	 * 取消订单原因ID
	 */
	@TableField(value = "cancel_reason_id")
	private Integer cancelReasonId;

	/**
	 * 审单额外状态（正常：NORMAL，拆单：SPLIT，合单：MERGE）
	 */
	@TableField(value = "review_extra_status")
	private String reviewExtraStatus;

	/**
	 * 出库库存
	 */
	@TableField("out_of_stock")
	private String outOfStock;

	/**
	 * 特殊退款（N:否，Y：是）
	 */
	@TableField(value = "is_special_refund")
	private String isSpecialRefund;

	/**
	 * 创建时间
	 */
	@TableField(value = "created_at", fill = FieldFill.INSERT)
	private LocalDateTime createdAt;

	/**
	 * 更新时间
	 */
	@TableField(value = "updated_at", fill = FieldFill.UPDATE)
	private LocalDateTime updatedAt;

	/**
	 * 是否已删除
	 */
	@TableLogic
	@TableField(value = "deleted_at")
	private LocalDateTime deletedAt;

	/**
	 * 淘宝订单oaid
	 */
	@TableField(value = "oaid")
	private String oaid;

	/**
	 * 订单处理类型 AUTO:自动 MANUAL:手动
	 */
	@TableField(value = "handle_order_type")
	private String handleOrderType;

	/**
	 * 自动审单处理类型 DELAYED延时 TIMING定时
	 */
	@TableField(value = "auto_handle_type")
	private String autoHandleType;

	/**
	 * 物流运输状态
	 */
	@TableField(value = "express_transport_status")
	private String expressTransportStatus;

	/**
	 * 物流运输记录时间
	 */
	@TableField(value = "express_transport_date_time")
	private LocalDateTime expressTransportDateTime;
	
	/**
	 * 订单总重量
	 */
	@TableField(value = "order_total_weight")
	private BigDecimal orderTotalWeight;


	/**
	 * 物流平台
	 */
	@TableField(value = "express_platform",updateStrategy = FieldStrategy.IGNORED)
	private String expressPlatform;

	/**
	 * 物流平台ID
	 */
	@TableField(value = "express_platform_id",updateStrategy = FieldStrategy.IGNORED)
	private Integer expressPlatformId;

	/**
	 * 承运商编码
	 */
	@TableField(value = "carrier_code",updateStrategy = FieldStrategy.IGNORED)
	private String carrierCode;

	/**
	 * 承运商名称
	 */
	@TableField(value = "carrier_name",updateStrategy = FieldStrategy.IGNORED)
	private String carrierName;

	/**
	 * 淘宝buyer_open_uid
	 */
	@TableField(value = "buyer_open_uid")
	private String buyerOpenUid;

	/**
	 * 快递价格预估
	 */
	@TableField(value = "express_cost_estimate")
	private BigDecimal expressCostEstimate;

	/**
	 * 预估计费重量
	 */
	@TableField(value = "charging_weight_estimate")
	private BigDecimal chargingWeightEstimate;

	/**
	 * 财报物流费用
	 */
	@TableField(value = "frs_express_cost")
	private BigDecimal frsExpressCost;

	/**
	 * 预估快递费用明细
	 */
	@TableField(value = "express_cost_estimate_detail")
	private String expressCostEstimateDetail;

	/**
	 * 揽收时间
	 */
	@TableField(value = "collection_date")
	private LocalDateTime collectionDate;

	/**
	 * 签收时间
	 */
	@TableField(value = "signing_date")
	private LocalDateTime signingDate;

	/**
	 * 打单时间
	 */
	@TableField(value = "print_order_date")
	private LocalDateTime printOrderDate;

	/**
	 * 所属品牌
	 */
	@TableField(value = "brand")
	private String brand;
}
